<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>


<%@ include file="admin_menu.jsp"%>
<!--/sidebar-->
<div class="main-wrap">

	<div class="crumb-wrap">
		<div class="crumb-list">
			<i class="icon-font"></i><a href="admin_index.jsp">首页</a><span
				class="crumb-step">&gt;</span><span class="crumb-name">图书管理</span>
		</div>
	</div>
	<div class="result-wrap">
		<form name="myform" id="myform" method="post" action="admin_douserdel">
			<div class="result-title">
				<div class="result-list">
					<a href="admin_tobookadd"><i class="icon-font"></i>新增图书</a> 
				</div>
			</div>
			<div class="result-content">
				<table class="result-tab" width="100%">
					<tr align="center">
						<th>图书ID</th>
						<th>图书封面</th>
						<th>图书名称</th>
						<th>图书价格</th>
						<th>图书描述</th>
						<th>图书库存</th>
						<th>操作</th>
					</tr>
					<c:forEach var="i" items="${blist}">
						<tr align="center">
							<td>${i.book_id}</td>
							<td>
								<img src="../images/book/${i.book_image}" width="80" height="95" alt="${i.book_image}">
							</td>
							<td>${i.book_name}</td>
							<td>${i.book_price}</td>
							<td>${i.book_description}</td>
							<td>${i.book_stock}</td>
							<td>
								<a href="admin_tobookupdate?id=${i.book_id}">修改</a>
								<a href="javascript:del(${i.book_id})">删除</a>
							</td>
						</tr>
					</c:forEach>

					<script>
						function del(id) {
							if (confirm("确定删除"+id+"吗?")) {
								location.href = "admin_dobookdel?id=" + id;
							}
						}
					</script>
				</table>
				<div class="list-page"></div>
			</div>
		</form>
	</div>
</div>
</div>
</body>
</html>